package com.iamk.util;

import java.io.File;
import java.util.ArrayList;

import com.jMEF.gmm.MixtureModel;

public class LoadGMM {
	final static File FILE = new File("GMM_MSCR");

	public static ArrayList<MixtureModel> getMixtureModels() {
		ArrayList<MixtureModel> results = new ArrayList<MixtureModel>();
		File[] temp;
		MixtureModel mm=null;
		if (FILE.isDirectory() && FILE.exists()) {
			temp=FILE.listFiles();
		} else {
			return null;
		}
		for(int i=0;i<temp.length;i++){
//			System.out.println(temp[i].getPath());
			mm=MixtureModel.load(temp[i].getPath());
			results.add(mm);
		}
		return results;
	}
//	public static void main(String[] args) {
//		System.out.println(getMixtureModels().size());
//	}
}
